package io.nutz.nutzsite.module.exam.models;

import io.nutz.nutzsite.common.base.BaseModel;
import io.nutz.nutzsite.common.utils.excel.annotation.ExcelField;
import io.nutz.nutzsite.module.sys.models.Dept;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.nutz.dao.entity.annotation.*;

import java.io.Serializable;
import java.util.Date;
		
/**
 * 题目表 exam_question
 * 
 * @author lrw
 * @date 2020-04-08
 */
@Table("exam_question")
public class Question extends BaseModel implements Serializable {
	private static final long serialVersionUID = 1L;
	
			@Id
		@Column("id")
	@Comment("题号")
	private Integer id;

		/** 题库代码 */
	@Column("qdbid")
	@Comment("题库代码")
	@ExcelField(title="题库代码,\r\n信息技术代码80")
	private Integer qdbid;

		/** 知识块代码 */
	@Column("kbid")
	@Comment("知识点编号")
	@ExcelField(title="知识点编号,\r\n以80开头")
	private Integer kbid;

		/** 题型代码 */
	@Column("qtid")
	@Comment("题型代码")
	@ExcelField(title="题型代码:\r\n1表示单选题、2多选题、4判断题")
	private Integer qtid;

		/** 难易度1非常容易-5非常难 */
	@Column("qteasy")
	@Comment("难易度1非常容易-5非常难")
	@ExcelField(title="难易度:\r\n1-5分别表示非常容易-非常难五个等级")
	private Integer qteasy;

		/** 是否开放0关闭1开放 */
	@Column("status")
	@Comment("是否开放0关闭1开放")
	private boolean status;

		/** 题干 */
	@Column("name")
	@Comment("题干")
	@ExcelField(title="题干")
	private String name;

		/** 参考答案 */
	@Column("qans")
	@Comment("参考答案")
	@ExcelField(title="参考答案,\r\n是ABCD,判断是A或B")
	private String qans;
	
	private String stuans;

		/** 选项A */
	@Column("ansA")
	@Comment("选项A")
	@ExcelField(title="选项A，\r\n也是判断题的第一个选项")
	private String ansA;

		/** 选项B */
	@Column("ansB")
	@Comment("选项B")
	@ExcelField(title="选项B，\r\n也是判断题的第二个选项")
	private String ansB;

		/** 选项C */
	@Column("ansC")
	@Comment("选项C")
	@ExcelField(title="选项C")
	private String ansC;

		/** 选项D */
	@Column("ansD")
	@Comment("选项D")
	@ExcelField(title="选项D")
	private String ansD;

		/** 选项E */
	@Column("ansE")
	@Comment("选项E")
	private String ansE;

		/** 选项F */
	@Column("ansF")
	@Comment("选项F")
	private String ansF;

		/** 选项G */
	@Column("ansG")
	@Comment("选项G")
	private String ansG;

		/** 选项H */
	@Column("ansH")
	@Comment("选项H")
	private String ansH;

		/** 选项I */
	@Column("ansI")
	@Comment("选项I")
	private String ansI;

		/** 解析 */
	@Column("qnote")
	@Comment("解析")
	@ExcelField(title="解析，\r\n是解题分析，可不填")
	private String qnote;
	
	private float qscore;//抽题后使用
	private float stuscore;
    @One(field = "qdbid")
    private Qdb qdb;

    @One(field = "qtid")
    private Qtype qtype;
    
	public Qdb getQdb() {
		return qdb;
	}

	public void setQdb(Qdb qdb) {
		this.qdb = qdb;
	}

	public Qtype getQtype() {
		return qtype;
	}

	public void setQtype(Qtype qtype) {
		this.qtype = qtype;
	}

	public void setId(Integer id) 
	{
		this.id = id;
	}

	public Integer getId() 
	{
		return id;
	}

	public void setQdbid(Integer qdbid) 
	{
		this.qdbid = qdbid;
	}

	public Integer getQdbid() 
	{
		return qdbid;
	}

	public void setKbid(Integer kbid) 
	{
		this.kbid = kbid;
	}

	public Integer getKbid() 
	{
		return kbid;
	}

	public void setQtid(Integer qtid) 
	{
		this.qtid = qtid;
	}

	public Integer getQtid() 
	{
		return qtid;
	}

	public void setQteasy(Integer qteasy) 
	{
		this.qteasy = qteasy;
	}

	public Integer getQteasy() 
	{
		return qteasy;
	}



	public boolean isStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setQans(String qans) 
	{
		this.qans = qans;
	}

	public String getQans() 
	{
		return qans;
	}

	public String getStuans() {
		return stuans;
	}

	public void setStuans(String stuans) {
		this.stuans = stuans;
	}

	public void setAnsA(String ansA) 
	{
		this.ansA = ansA;
	}

	public String getAnsA() 
	{
		return ansA;
	}

	public void setAnsB(String ansB) 
	{
		this.ansB = ansB;
	}

	public String getAnsB() 
	{
		return ansB;
	}

	public void setAnsC(String ansC) 
	{
		this.ansC = ansC;
	}

	public String getAnsC() 
	{
		return ansC;
	}

	public void setAnsD(String ansD) 
	{
		this.ansD = ansD;
	}

	public String getAnsD() 
	{
		return ansD;
	}

	public void setAnsE(String ansE) 
	{
		this.ansE = ansE;
	}

	public String getAnsE() 
	{
		return ansE;
	}

	public void setAnsF(String ansF) 
	{
		this.ansF = ansF;
	}

	public String getAnsF() 
	{
		return ansF;
	}

	public void setAnsG(String ansG) 
	{
		this.ansG = ansG;
	}

	public String getAnsG() 
	{
		return ansG;
	}

	public void setAnsH(String ansH) 
	{
		this.ansH = ansH;
	}

	public String getAnsH() 
	{
		return ansH;
	}

	public void setAnsI(String ansI) 
	{
		this.ansI = ansI;
	}

	public String getAnsI() 
	{
		return ansI;
	}

	public void setQnote(String qnote) 
	{
		this.qnote = qnote;
	}

	public String getQnote() 
	{
		return qnote;
	}

	public float getQscore() {
		return qscore;
	}

	public void setQscore(float qscore) {
		this.qscore = qscore;
	}

	public float getStuscore() {
		return stuscore;
	}

	public void setStuscore(float stuscore) {
		this.stuscore = stuscore;
	}

	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("qdbid", getQdbid())
            .append("kbid", getKbid())
            .append("qtid", getQtid())
            .append("qteasy", getQteasy())
            .append("status", isStatus())
            .append("qname", getName())
            .append("qans", getQans())
            .append("ansA", getAnsA())
            .append("ansB", getAnsB())
            .append("ansC", getAnsC())
            .append("ansD", getAnsD())
            .append("ansE", getAnsE())
            .append("ansF", getAnsF())
            .append("ansG", getAnsG())
            .append("ansH", getAnsH())
            .append("ansI", getAnsI())
            .append("qnote", getQnote())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("UpdateBy", getUpdateBy())
            .append("UpdateTime", getUpdateTime())
            .toString();
    }
}
